package com.itboye.textileexpres.base;

import android.util.Log;

import com.itboye.core.interfaces.ICompleteListener;
import com.itboye.textileexpes.json.XRequestListener;

public class BaseSuccessReqListener<T> extends XRequestListener<T> {

	public static String SUCCESS = "0";
	private ICompleteListener listener;

	public BaseSuccessReqListener(ICompleteListener listener) {
		this.listener = listener;
	}

	@Override
	public void onResponse(T resp) {
		Log.v("resp", resp.getClass().getName());
		if (listener != null) {
			ResultEntity result = new ResultEntity(SUCCESS, "请求成功", resp);
			listener.success(result);
		}
	}

}
